package com.tyun.modules.sys.controller;

import com.tyun.modules.sys.entity.SysUser;
import org.apache.shiro.SecurityUtils;

/**
 * 获取基本信息
 *
 * @author tao cong cong
 * @create 2018/5/13 下午7:34
 */
public abstract class CommonController {

    protected SysUser getUser(){
        return (SysUser) SecurityUtils.getSubject().getPrincipal();
    }

    protected String getUserId(){
        return getUser().getUserid();
    }
}
